<template>
	<view>
		<u-navbar title-color="#333" title-bold title-size="36" :title="title" :border-bottom="false"></u-navbar>
		<view class="u-padding-24">
			<!-- <rich-text :nodes="richText"></rich-text> -->
			<rich-text :nodes="richText"></rich-text>
		</view>
	</view>
</template>

<script>
	import { formatRichText } from '@/static/richText.js'
	export default {
		data() {
			return {
				richText: '',
				title:''
			}
		},
		onLoad(e) {
			this.title = e.title
			this.getDetail(e.id)
		},
		methods: {
			getDetail(e) {
				this.$api({
					url: '/getPage',
					method: 'get',
					data: {
						token: uni.getStorageSync("token"),
						id:e
					},
				}).then(res => {
					if (res.code == 1) {
						this.richText = formatRichText(res.data.content)
					}
				})
			}
		}
	}
</script>

<style>
page{
	background-color: #fff;
}
</style>